package com.iespring.util;

import java.util.Random;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author:ZhangShuPeng
 * @Date:2023/01/02/12:20
 * @Description:
 */
public class RandomStringUtil {

    public static String getRandomString() {
        String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
        Random random = new Random();
        StringBuffer stringBuffer = new StringBuffer();
        int length = 8;
        for (int i = 0; i < length; i++) {
            int number = random.nextInt(36);
            stringBuffer.append(str.charAt(number));
        }
        return stringBuffer.toString();
    }
}
